{- |
Module      :  TestUtils.hs
Description :  Template File for rest of project
Copyright   :  (c) Michal Parusinski
License     :  GPLv3

Maintainer  :  mparusinski@googlemail.com
Stability   :  unstable
Portability :  portable

Series of utility function for testing purpose
-}

module TestUtils where 

import Test.HUnit

createEqualityTest output input expected
    = TestCase $ assertEqual output expected input

testLabelMaker label (num,test) = TestLabel (label++": "++show num) test

quickTestList :: String -> [Test] -> Test
quickTestList label tests
    = TestList $ map (testLabelMaker label) reshapedTests
    where reshapedTests = zipWith tupler [1..length tests] tests
          tupler a b    = (a,b)
